<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="dist/vue.js"></script>
</head>

<body>
    <div id="app">
        <div @click="[test,before,mounted]">
            div
        </div>
        <comp @hook:created="before" @hello="mounted" @hook:beforeUpdate="mounted" @hook:mounted="mounted"></comp>
        {{counter}}
    </div>
    <script>
        Vue.component('comp', {
            name:'comp',
            data() {
                return {
                    title: 'test'
                }
            },
            render(h) {
                return h('div', {}, this.title)
            }
        })
        let app = new Vue({
            name:'app',
            el: '#app',
            data() {
                return {
                    counter: 0
                }
            },
            components: {

            },
            beforeMount() {

            },
            mounted() {
                setInterval(() => {
                    this.counter++;
                }, 1000)
            },
            methods: {
                test() {
                    console.log(this.counter);
                },
                mounted() {
                    console.log(1);
                },
                before() {
                    console.log(2)
                }
            }
        });
    </script>
</body>

</html>